<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    hello
    <!-- comment -->
    <h1>hello</h1>
    <script>
      /*
            

            nodeName
            1. 是所有的节点对象都有的属性
            2. 返回一个语义化的字符串来记录区分不同节点的类型
                文本节点===#text
                注释节点===#comment
                元素节点===H1
                document===#document
        */
      const nodes = document.body.childNodes;
      console.log(nodes);
      console.log(nodes[0].nodeName);
      console.log(nodes[1].nodeName);
      console.log(nodes[3].nodeName);
      console.log(document.nodeName);
    </script>
  </body>
</html>
